#include <cstdio>
// #include <functional>   // std::greater
#include <iostream>
#include <algorithm>

using namespace std;

int score[35];

int main()
{
    int N, K;
    int sum = 0;
    scanf("%d", &N);
    for(int i = 0; i < N; i++) {
        scanf("%d", &score[i]);
    }

    scanf("%d", &K);
    sort(score, score + N, greater<int>());

    for(int i = 0; i < K; i++) {
        sum = sum + score[i];
    }

    printf("%.2f\n", 1.0*sum/K);

    return 0;
}

